package com.baidu.sggc;

import com.baomidou.mybatisplus.generator.FastAutoGenerator;
import java.nio.file.Paths;

public class CodeGenerate {

  public static void main(String[] args) {
    FastAutoGenerator.create("jdbc:mysql://:8306/portal", "root", "")
        .globalConfig(builder -> builder
            .author("lianglin")
            .outputDir(Paths.get(System.getProperty("user.dir")) + "/src/main/java")
            .commentDate("yyyy-MM-dd")
        )
        .packageConfig(builder -> builder
            .parent("com.baidu.sggc")
            .entity("entity")
            .mapper("mapper")
            .serviceImpl("service")
            .controller("controller")
            .xml("mapper.xml")
        )
        .strategyConfig(builder -> builder
            .entityBuilder()
            .enableLombok())
        .templateEngine(null)
        .execute();
  }



}
